package com.sj.common.dto.comment;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: xiaoqi
 * Date: 2022-03-17
 * Time: 上午 11:33
 * Description: 发布评论参数
 *
 * @author xiaoqi
 * @since 2022-03-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommentParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("文章id")
    @NotNull
    private Integer articleId;

    @ApiModelProperty("评论内容")
    @NotBlank
    private String content;

    @ApiModelProperty("评论类型 回复（answer） 评论 （comment）")
    @NotBlank
    private String type;

    @ApiModelProperty("父评论id 如果该评论或回复为最高及评论 则为0 否则为父评论id")
    @NotNull
    private Integer parentId;
}